<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@include file="/context/mytags.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <title></title>
    <t:base type="jquery,easyui,tools,DatePicker,ckeditor"></t:base>
    <link rel="stylesheet" href="${webRoot}/plug-in/lhgDialog/skins/blue.css"/>
    <link rel="stylesheet" href="${webRoot}/plug-in/lhgDialog/skins/default.css"/>
    <script type="text/javascript" src="${webRoot}/plug-in/ajaxfileupload/ajaxfileupload.js"></script>
    <script type="text/javascript" charset="utf-8"
            src="${webRoot}/plug-in/ueditor1_4_3-utf8-jsp/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8"
            src="${webRoot}/plug-in/ueditor1_4_3-utf8-jsp/ueditor.all.min.js"></script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" charset="utf-8"
            src="${webRoot}/plug-in/ueditor1_4_3-utf8-jsp/lang/zh-cn/zh-cn.js"></script>
    <script type="text/javascript" charset="utf-8" src="${webRoot}/plug-in/QQgeo/geo.js"></script>
    <script type="text/javascript" charset="utf-8" src="${webRoot}/plug-in/My97DatePicker/WdatePicker.js"></script>
</head>
<body scroll="no">
<t:formvalid formid="addformobj" dialog="true" usePlugin="password" layout="table"
             action="questController.do?saveorupdate">
    <div class="new_table_list" id="showDiv">
    </div>
</t:formvalid>
<script type="text/javascript">
    $(function () {
        initData("${cqid}");
    });


    function initData(cqid) {
        var url = "cqDimResultController.do?getData";
        $.ajax({
            url: url,
            async: true, // 注意此处需要同步
            type: "GET",
            dataType: "json",
            data: {cqid: cqid},
            success: function (data) {
                var showDiv = $("#showDiv");
                if (data.length == 0) {
                    showDiv.html('暂无分析结果');
                } else {
                    for (var i = 0; i < data.length; i++) {
                        var _html = "";
                        var dim_name = data[i].dim_name;
                        var result_name = data[i].result_name;
                        var result_desc = data[i].result_desc;
                        _html += '<div style="padding: 10px;">';
//                        _html +=('<div>'+dim_name+'：'+result_name+'</div>');
                        _html +=('<div>'+dim_name+'</div>');
                        _html +=('<div style="padding-left: 30px;">'+result_desc+'</div>');
                        showDiv.append(_html);
                    }

                }
            }
        });
    }
</script>
</body>

</html>